

export const classname: { [key: string]: string } = {
    one: '1,99,1,1,1', five: '99,99,99,99,99', fist: '1,1,1,1,1', ok: '1,1,99,99,99', prayer: '99,99,99,99,99', congratulation: '50,50,50,50,50', honour: '1,1,1,1,1', heart_single: '50,50,1,1,50', thumb_up: "99,1,1,1,1", thumb_down: "99,1,1,1,1", ily: "99,99,1,1,99", palm_up: "99,99,99,99,99", heart_1: "45,45,45,45,45", heart_2: "50,50,50,50,50", heart_3: "1,80,80,80,80", two: "1,99,99,1,1", three: "1,99,99,99,1", four: "1,99,99,99,99", six: "99,1,1,1,99", seven: "70,50,50,1,1", eight: "99,99,1,1,1", nine: "1,60,1,1,1", rock: "1,99,1,1,99", insult: "1,1,99,1,1", other: "any"
}

const n: { [key: string]: string } = {
    '1': classname.one,
    '2': classname.two,
    '3': classname.three,
    '4': classname.four,
    '5': classname.five,
    '6': classname.six,
    '7': classname.seven,
    '8': classname.eight,
    '9': classname.nine,
    '十': classname.fist,
    '比心': classname.heart_single,
    '赞': classname.thumb_up,
    '一': classname.one,
    '二': classname.two,
    '三': classname.three,
    '四': classname.four,
    '五': classname.five,
    '六': classname.six,
    '七': classname.seven,
    '八': classname.eight,
    '九': classname.nine,
}

const nz: { [key: string]: string } = {
    '1': 'one',
    '2': 'two',
    '3': 'three',
    '4': 'four',
    '5': 'five',
    '6': 'six',
    '7': 'seven',
    '8': 'eight',
    '9': 'nine',
    '一': 'one',
    '二': 'two',
    '三': 'three',
    '四': 'four',
    '五': 'five',
    '六': 'six',
    '七': 'seven',
    '八': 'eight',
    '九': 'nine',
    '十': 'fist',
    '比心': 'heart_single',
    '赞': 'thumb_up'
}

export function jsjiaodu(name: string): [string, string] {
    let x: string = ''
    let key = 'other'
    for (let z in n) {
        z = z.toLocaleLowerCase()
        if (name.includes(z)) {
            key = nz[z]
            x = n[z]
            break;
        }
    }

    console.log(key)
    if (!x) {
        for (let z in classname) {
            z = z.toLocaleLowerCase()
            if (name.includes(z)) {
                key = z
                x = classname[z]
                break;
            }
        }
    }
    return [x, key]
}

